<!-- 新增人员-->
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="renderer" content="webkit">

  <title>编辑人员</title>
  <link href="../lib/css/font-awesome-4.5.0/css/font-awesome.min.css" rel="stylesheet">
  <link href="../css/reset.css" rel="stylesheet">
  <link href="../css/style.css" rel="stylesheet">

  <!-- 自定义css -->
  <link href="../css/addInfo.css" rel="stylesheet">

  <script src="../lib/jquery/dist/jquery.js"></script>

  <script src="../lib/angular-1.3.0/angular.js"></script>
  <script type="text/javascript">
	  var app = angular.module("app", []);

	  app.controller("editWorkerInfoCtrl", function($scope) {	  	
	  	this.isShow = {
	  		isShowInput: false,
	  		isShowTechInfo: false,
	  	}

	  	this.certifyData = [
	  		{
	  			id:'1',
	  			name:'特种作业人员'
	  		},
	  		{
	  			id:'2',
	  			name:'三类人员'
	  		},
	  		{
	  			id:'3',
	  			name:'普通人员'
	  		},
	  	]

	  	this.addCertify = () => {
	  		var html = "";
	  		html += "<tr>"+
									"<td><select class='form-control-select'><option value=''>特种作业人员</option></select></td>"+
									"<td><input type='text' class='form-control-input'></td>"+
									"<td><input type='text' class='form-control-input'></td>"+
									"<td><input type='text' class='form-control-input'></td>"+
									"<td><input type='text' class='form-control-input' ng-datepicker></td>"+
									"<td ng-click='vm.cancelCertify()'><i class='fa fa-times-circle'></i></td>"+
								"</tr>";
				$("#add_certify").append(html);
	  	}

	  	// 取消新增证书
	  	this.cancelCertify = () => {
	  		debugger; // ?? 
	  		console.log(111);
	  	}

	  	// 删除证书
	  	this.delCertifyData = (item, index) => {
	  		this.certifyData.splice(index, 1);
	  	}

	  	// 保存编辑信息
	  	this.saveData = (param) => {
	  		console.log(param);
	  	}
	  });
  </script>
</head>
<body ng-app="app" ng-controller="editWorkerInfoCtrl as vm">
	<div class="main">
		<form class="base-info" name="worker">
			<div class="main-content">
				<div class="container-header fs-16">
					<span>人员信息详情表</span>
				</div>
				<div class="info-item">
					<div class="info-num w-15">
						<div class="img-box">
							<img src="../image/addBt.jpg" alt="">
						</div>
					</div>
					<div class="info-num w-85">
						<div class="info-margin">
							<div class="info-item-header fs-16">
								<div class="pa-form-control">
									<label><b>*</b>姓名：</label>
									<span>王大锤</span>
								</div>
								<div class="pa-form-control fr">
									<label><b>*</b>人员种类：</label>
									<select name="" id="" class="form-control-input">
										<option value="0">特种作业人员</option>
										<option value="1">三类人员</option>
										<option value="2">普通人员</option>
									</select>
								</div>
							</div>
							<div class="pa-form-control w-50 fs-16">
								<label class="fs-theme-color pa-info-label"><b>*</b>岗&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位</label>
								
							</div>
							<div class="pa-form-control w-50 fs-16">
								<label class="fs-theme-color pa-info-label"><b>*</b>部&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;门</label>
								<span>专职安全员</span>
							</div>
							<div class="pa-form-control w-50 fs-16">
								<label class="fs-theme-color pa-info-label"><b>*</b>单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位</label>
								<span>专职安全员</span>
							</div>
							<div class="pa-form-control w-50 fs-16">
								<label class="fs-theme-color pa-info-label"><b>*</b>进场时间</label>
								<span>2016-04-10</span>
							</div>
						</div>
					</div>
				</div>
				<div class="info-item">
					<div class="info-item-header fs-14">
						<label class="info-item-header-label">基本信息</label>
					</div>
					<div class="pa-form-control fs-14">
						<label class="fs-theme-color pa-base-info-label"><b>*</b>身份证号：</label>
						<span class="pa-base-info-fr">320689411545785412</span>
					</div>
					<div class="pa-form-control fs-14">
						<label class="fs-theme-color pa-base-info-label"><b>*</b>联系方式：</label>
						<input type="text" class="form-control-input">
					</div>
					<div class="pa-form-control fs-14">
						<label class="fs-theme-color pa-base-info-label">出场时间：</label>
						<span class="pa-base-info-fr">2011-02-10</span>
					</div>
					<div class="pa-form-control fs-14">
						<label class="fs-theme-color pa-base-info-label"><b>*</b>性别：</label>
						<span class="pa-base-info-fr">女</span>
					</div>
					<div class="pa-form-control fs-14">
						<label class="fs-theme-color pa-base-info-label"><b>*</b>出生日期：</label>
						<input type="text" class="form-control-input">
					</div>
					<div class="pa-form-control fs-14">
						<label class="fs-theme-color pa-base-info-label">年龄：</label>
						<input type="text" class="form-control-input">
					</div>
					<div class="pa-form-control fs-14">
						<label class="fs-theme-color pa-base-info-label">民族：</label>
						<span class="pa-base-info-fr">汉</span>
					</div>
					<div class="pa-form-control fs-14">
						<label class="fs-theme-color pa-base-info-label"><b>*</b>籍贯：</label>
						<input type="text" class="form-control-input">
					</div>
					<div class="pa-form-control fs-14">
						<label class="fs-theme-color pa-base-info-label">学历：</label>
						<input type="text" class="form-control-input">
					</div>
					<div class="pa-form-control fs-14">
						<label class="fs-theme-color pa-base-info-label">家庭地址：</label>
						<input type="text" class="form-control-input">
					</div>
					<div class="pa-form-control fs-14">
						<label class="fs-theme-color pa-base-info-label">备注：</label>
						<input type="text" class="form-control-input form-control-note">
					</div>
					<div class="pa-form-control fs-14 pa-base-info-block">
						<label class="fs-theme-color pa-base-info-label">指纹信息：</label>
						<span class="pa-base-info-fr">已采集</span>
					</div>
					<div class="pa-form-control fs-14">
						<label class="fs-theme-color pa-base-info-label">智能卡号：</label>
						<input type="text" class="form-control-input">
					</div>
				</div>
				<div class="info-item info-table">
					<div class="info-item-header fs-14">
						<label class="info-item-header-label">证书信息（三类人员、特种人员必填）</label>
						<div class="pa-operate fs-14 pa-operate-add" ng-click="vm.addCertify()">
							<a class="pa-btn-a">
								<i class="fa fa-plus"></i>
								<span>新增</span>
							</a>				
						</div>
					</div>
					<table class="add-table fs-14">
						<thead>
							<tr>
								<th>证书类别</th>
								<th>证书编号</th>
								<th>发证单位</th>
								<th>发证时间</th>
								<th>有效日期</th>
								<th class="operate-w20"></th>
							</tr>
						</thead>
						<tbody id="add_certify">
							<tr ng-repeat="item in vm.certifyData">
								<td>{{item.name}}</td>
								<td>121574115</td>
								<td>测试</td>
								<td>2012-02-10</td>
								<td>2012-02-10</td>
								<td ng-click="vm.delCertifyData(item, $index)"><i class="fa fa-times-circle"></i></td>
							</tr>
						</tbody>
					</table>
				</div>
				<div class="info-item">
					<div class="info-item-header fs-14">
						<label class="info-item-header-label">附件信息（简历/资料等附件）</label>
						<div class="pa-operate fs-14 pa-operate-add">
							<a class="pa-btn-a">
								<i class="fa fa-plus"></i>
								<span>新增</span>
							</a>				
						</div>
					</div>
					<div class="file-list">
						
					</div>
				</div>
			</div>
			<div class="pa-btn-area">
				<button class="pa-btn pa-btn-longer" type="button" ng-click="vm.saveData(worker)">保存</button>
				<button class="pa-btn pa-btn-longer reset-btn" type="button">取消</button>
			</div>	
		</form>
	</div>
</body>
</html>
